import { v4 as uuid } from 'uuid'

export const formPreviewSchema = {
  type: 'form',
  labelWidth: '70px',
  body: [
    {
      label: '字段1',
      type: 'input-text',
      placeholder: '输入框',
      key: uuid()
    },
    {
      label: '字段2',
      type: 'input-text',
      placeholder: '输入框',
      key: uuid()
    }
  ]
}

export const buttonPreviewSchema = {
  type: 'el-row',
  body: [
    {
      type: 'button',
      level: 'primary',
      body: 'primary'
    },
    {
      type: 'button',
      level: 'warning',
      body: 'warning'
    },
    {
      type: 'button',
      level: 'info',
      body: 'info'
    },
    {
      type: 'button',
      level: 'danger',
      body: 'danger'
    }
  ]
}

export const inputPreviewSchema = {
  type: 'input-text',
  labelWidth: '70px',
  label: '输入框',
  placeholder: '请输入',
}

export const crudPreviewSchema = {
  type: 'div',
  body: 'crud表格'
}